<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of XBEE_CONSETTINGS</TITLE>
</HEAD><BODY>
<H1>XBEE_CONSETTINGS</H1>
Section: Linux Programmer's Manual (3)<BR>Updated: 04-Mar-2012<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

xbee_conSettings
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>#include &lt;<A HREF="file:///usr/include/xbee.h">xbee.h</A>&gt;</B>

<P>
<B>xbee_err xbee_conSettings(struct xbee_con *</B><I>con</I><B>, struct xbee_conSettings *</B><I>newSettings</I><B>, struct xbee_conSettings *</B><I>oldSettings</I><B>);</B>

<P>
<PRE>
struct xbee_conSettings {
        /* libxbee options: */
        unsigned char noBlock;
        unsigned char catchAll;
        unsigned char noWaitForAck;
        
        /* generic options: */
        unsigned char queueChanges; /* for AT connections */
        unsigned char disableAck;   /* specific options for XBee 1 / causes use of FrameID 0x00 for others */
        unsigned char broadcast;
        
        /* XBee 2 / ZNet options: */
        unsigned char multicast;
        
        /* XBee ZigBee options: */
        unsigned char disableRetries;
        unsigned char enableEncryption;
        unsigned char extendTimeout;
        
        /* XBee 5 options: */
        unsigned char noRoute;

        /* other */
        unsigned char broadcastRadius;
};
</PRE>

<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

<B>xbee_conSettings</B>()

allows you to configure the connection's parameters.
<P>
One of
<I>newSettings</I> and <I>oldSettings</I>

can optionally be
<B>NULL</B>,

one must be non-NULL.
<P>
If they are non-NULL, then the struct pointed to by
<I>oldSettings</I>

will be filled with the effective settings before the call to
<B>xbee_conSettings</B>(),

and then
<I>newSettings</I>

will be used to update the connection's settings.
<A NAME="lbAE">&nbsp;</A>
<H3>Return Value</H3>

On success this function will return XBEE_ENONE, otherwise an error number from
<I>enum xbee_errors</I> (as specified in <I>&lt;<A HREF="file:///usr/include/xbee.h">xbee.h</A>&gt;</I>)

<A NAME="lbAF">&nbsp;</A>
<H2>EXAMPLE</H2>


<PRE>
#include &lt;<A HREF="file:///usr/include/xbee.h">xbee.h</A>&gt;

struct xbee *xbee;
struct xbee_con *con;
struct xbee_conSettings settings;

/* initialize xbee, using xbee_setup() */

/* initialize con, using xbee_conNew() */

if (xbee_conSettings(con, NULL, &amp;settings) != XBEE_ENONE) return;
settings.disableAck = 1;
if (xbee_conSettings(con, &amp;settings, NULL) != XBEE_ENONE) return;
</PRE>


<A NAME="lbAG">&nbsp;</A>
<H2>AUTHOR</H2>

Attie Grande &lt;<A HREF="mailto:attie@attie.co.uk">attie@attie.co.uk</A>&gt; 
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>

<B><A HREF="../man3/libxbee.3.html">libxbee</A></B>(3),

<B><A HREF="../man3/xbee_setup.3.html">xbee_setup</A></B>(3),

<B><A HREF="../man3/xbee_conNew.3.html">xbee_conNew</A></B>(3)

<P>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DL>
<DT><A HREF="#lbAE">Return Value</A><DD>
</DL>
<DT><A HREF="#lbAF">EXAMPLE</A><DD>
<DT><A HREF="#lbAG">AUTHOR</A><DD>
<DT><A HREF="#lbAH">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 18:19:28 GMT, September 04, 2013
</BODY>
</HTML>
